The subject matter disclosed herein relates generally to industrial control networks for controlling machines and industrial processes and, more specifically, to handling events generated within the industrial controller.
Industrial controllers are special purpose computers used for controlling factory automation and the like. Industrial controllers typically execute a control program highly customized to a particular control application. Special control languages, such as “relay ladder logic” are normally used to facilitate programming of the device. Under the direction of the stored program, a processor of the industrial controller periodically examines the state of input devices and updates the state of output devices. In order to ensure predictable control of a machine or process, the control program must be highly reliable and deterministic, that is, executing at well-defined time periods.
As industrial processes grow in complexity, an increasing number of devices are being connected to the industrial controller. The devices are often distributed about a machine or along a process line. The increasing number of devices and distribution of these devices about the machine require more complex control programs. In addition, the controlled processes are continually demanding higher throughput or rates of production. As a result, the inputs to the controller are generated at higher rates and require that the signals output from the controller be generated at higher rates.
It is understood that increasing the speed at which a processor executes allows a control program to be executed at a faster rate. However, increasing processor speed is not without drawbacks. Increasing the clock speed creates timing issues between other hardware components in the processor module. Further, an increased clock speed can generate undesirable radiated emissions from interconnections that begin to function as an antenna. In addition, the increasing complexity of the system often results in additional length of the control program. Because control programs are executed at a periodic interval, the additional length of the control program may result in the control program executing within the same time interval, or perhaps in a longer time interval, even with increased processor speed. Thus, it would be desirable to provide an improved system for handling the increased rate at which input signals are received and output signals must be generated.
It is also understood that not all of the inputs need to be processed with an increased frequency. One method for increasing the rate of processing input signals is to identify a portion of the inputs that require increased processing and generate an interrupt when the input signal is, for example, at a certain state or changes state. An interrupt handler may then execute a small portion of control code which updates one or more output signals responsive to the input signal. Upon completion of the small portion of control code, the interrupt handler returns to execution of the general control program. An interrupt handler, however, is not without drawbacks as well. As an increasing number of inputs are identified as requiring processing at an increased frequency, the amount of time required to process the interrupt control code increases and may increase to a point where the general control code cannot complete within the required time interval to provide the deterministic control required by an industrial controller. Further, as the number of interrupts increases, the likelihood that additional interrupts occur while another section of interrupt control code is executing increases. Thus, execution of the subsequent interrupt control code may not be executed.
Even if all of the interrupt control code is executed, the interrupt control code may execute based on inaccurate data. The interrupt handler must first receive the input signal to indicate that the interrupt control code is to be executed. The input signal may occur at a location remote from the controller and may be passed, for example, from a remote input module through an input scanner and an industrial network to the controller. By the time the controller receives the input indicating that the interrupt control code needs to be executed, the state of one or more of the inputs in the process may have changed. Thus, when the interrupt control code executes it may generate output signals based on an inaccurate set of input signals. Thus, it would be desirable to provide an improved system for handling events in an industrial control system for a controlled machine or process.